home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac: Not for Sale / Another.not.for.sale (Australia).iso / hold me in your arms / Virtual-Worlds / commercial / CDK_notes1 < prev    next >
Internet Message Format  |  1993-07-13  |  45KB

  1. From: autodesk!prs@uunet.UU.NET (Pete Samson)
  2. Newsgroups: sci.virtual-worlds
  3. Subject: SOFTWARE: Description of CDK
  4. Keywords: CDK, Cyberspace Developer Kit, virtual reality toolkit
  5. Date: 12 Jul 93 18:19:06 GMT
  6. Organization: Autodesk, Inc.
  7. Lines: 1352
  8.  
  9.  
  10.         CyTechnicalNote #1
  11.  
  12.         CYBERSPACE DEVELOPER KIT CONCEPTS & COMPONENTS
  13.  
  14.            ASCII version: June 30, 1993           for CDK Release 1.0
  15.  
  16.            Copyright 1993 by Autodesk, Inc.
  17.  
  18.  
  19. ABOUT THIS TECHNICAL NOTE: This is the first of a projected series of
  20. technical notes or white papers about the Autodesk Cyberspace
  21. Developer Kit (CDK) and related issues. The series is meant to convey
  22. information to cyberspace developers and other interested people
  23. quickly and in a concise format. Later notes will supplement the CDK
  24. DEVELOPER'S MANUAL.
  25.  
  26. This first note, number 1, contains material from the DEVELOPER'S
  27. MANUAL. The intended audience is developers who aren't yet familiar
  28. with the contents or structure of the CDK.
  29.  
  30. This note has been converted to ASCII and lightly edited for on-line
  31. posting. A section on pricing and availability is included.
  32.  
  33.  
  34. 1. BASIC CDK CONCEPTS
  35. =====================
  36.  
  37. The Autodesk Cyberspace Developer Kit (CDK) is an object-oriented
  38. programming library for creating interactive, three-dimensional
  39. visualization and simulation software -- also known as "virtual
  40. reality" applications. The CDK provides a unified, comprehensive set
  41. of classes that professional developers can combine and extend to make
  42. finished applications for a variety of hardware configurations. It
  43. also supports interactive hands-on experimentation and prototyping.
  44. The CDK contains more than 140 predefined classes, which in turn
  45. comprise more than 1200 publicly accessible member functions.
  46.  
  47. Applications that benefit the most from virtual reality techniques tend
  48. to have some or all of the following characteristics:
  49.  
  50.     o They model behavior as well as appearance of objects.
  51.  
  52.     o They emphasize real-time visualization of three-dimensional
  53.       geometry.
  54.  
  55.     o They allow a user to experience ergonomic issues in a design.
  56.  
  57.     o They explore innovative interaction techniques.
  58.  
  59. To create such applications, you often need the following:
  60.  
  61.     o Convenient ways to import and export geometrical models as well as
  62.       techniques for dynamically creating new geometry
  63.  
  64.     o Reliable access to a variety of relatively unusual input devices
  65.       for manipulating objects in three dimensions
  66.  
  67. The CDK provides a consistent framework that solves these and other
  68. problems in building virtual reality applications. Specifically, the
  69. class library presents abstractions for the following activities:
  70.  
  71.     o Definition and display of three-dimensional geometry, including
  72.       complex objects
  73.  
  74.     o Interaction with the geometry
  75.  
  76.     o Simulation of physical properties and other object behavior
  77.  
  78.     o Proper sequencing of events within a simulation frame
  79.  
  80.     o Access to a variety of sensing devices
  81.  
  82.     o Support for audio through a MIDI interface
  83.  
  84. The point of CDK programs is to create a kind of interactive simulation,
  85. sometimes called a "cyberspace," or simply a "space."
  86.  
  87. Although the classes within the CDK don't require that an application
  88. conform to a rigid structure, they are designed with a particular model
  89. in mind.
  90.  
  91. A user "enters" a space using a "deck." A deck is a computer that has
  92. one or more input devices, such as a glove or a mouse, and an output
  93. device, such as a head-mounted display or a VGA screen.
  94.  
  95. Input devices are called "sensors." A sensor can be a simple device such
  96. as a mouse or a complex device that gives six-dimensional input. (A six-
  97. dimensional sensor gives three-dimensional position plus the rotational
  98. dimensions of roll, pitch, and yaw.)
  99.  
  100. Output devices are called "displays" or "effectors." A display can be as
  101. simple as a VGA board or it can be a sophisticated three-dimensional
  102. display device. The term effector includes displays as well as devices
  103. such as MIDI synthesizers and physical feedback devices.
  104.  
  105. One advantage of the CDK is that you do not necessarily need to know
  106. what sensors or effectors will be available to the user of the program.
  107. You usually write the program so that it looks at environment variables
  108. to determine what devices are in the deck.
  109.  
  110. Spaces can contain "simulated objects" and "dynamics." Simulated objects
  111. may have a certain appearance or behavior or both appearance and
  112. behavior. Dynamics are objects that control interactions between
  113. simulated objects, such as spring behavior or gravity. A special kind of
  114. simulated object is a "viewer." Viewers represent the user's point of
  115. view in the space.
  116.  
  117.  
  118. 1.1 Terminology
  119. ===============
  120.  
  121. Since cyberspace is a new field, no consistently defined terms exist to
  122. describe its experience, content, or structure. The following
  123. definitions are the ones used in CDK documentation:
  124.  
  125.     cyberspace     The simulated environment experienced by a user who
  126.                    is running a developer's cyberspace software
  127.                    application.
  128.  
  129.     space          Same as cyberspace.
  130.  
  131.     simulated object
  132.                    An entity in a cyberspace that may have an appearance
  133.                    and may have a behavior. Sometimes simply called an
  134.                    "object."
  135.  
  136.     deck           The total hardware system, including sensors and
  137.                    effectors, required to run a cyberspace application.
  138.  
  139.     dynamics       Objects that control interactions between simulated
  140.                    objects.
  141.  
  142.     effector       A device that transmits information to the user. Also
  143.                    called "output peripheral" or "display" (for example,
  144.                    a monitor, headmount display, or MIDI device). Rather
  145.                    than being directly concerned with the device that
  146.                    the user perceives, CDK programs actually deal with
  147.                    hardware such as video cards.
  148.  
  149.     sensor         A device that collects information from the user.
  150.                    Also called "input peripheral" (for example, a mouse,
  151.                    trackball, or glove).
  152.  
  153.     method         A C++ class member function.
  154.  
  155.     utility classes
  156.                    CDK classes providing generally useful abstractions
  157.                    that can be included in applications other than
  158.                    cyberspace.
  159.  
  160.  
  161. 1.1.1 Time Terminology and Concepts
  162.  
  163. Because the CDK deals with simulation, time and the relationships
  164. between real time and simulation time are important. The following time
  165. terms and concepts are used in dealing with time in the CDK:
  166.  
  167.     real time      Clock time.
  168.  
  169.     simulated time
  170.                    Time within the context of a simulation. This may not
  171.                    be the same as real time. You can use a CyClockSync
  172.                    object to coordinate simulated time and real time.
  173.  
  174.     time scale     The ratio between real time and simulated time.
  175.  
  176.     deck frame     Usually called a frame. One traversal of the
  177.                    Canonical Scheduling Tree (CST). All activity within
  178.                    a frame takes place at the same simulated time.
  179.  
  180.     simulation frame
  181.                    One invocation of the Simulate method of a space.
  182.                    Sometimes this is done multiple times within a deck
  183.                    frame. You can tell the CDK how many simulation
  184.                    frames you want per deck frame by calling
  185.                    CySpace::SetSimsPerFrame.
  186.  
  187.     dt             Simulated time per deck frame, sometimes called a
  188.                    clock tick or a tick. You define this value by
  189.                    calling CySpace::SetDt. (You can also set this value
  190.                    in the dynamics and the resolver, but that is not
  191.                    recommended.) A CyClockSync object adjusts this value
  192.                    to keep a constant time scale.
  193.  
  194.     frame rate     The number of frames per second of real time. You can
  195.                    use an object of type CyLoopTimer to obtain this
  196.                    value.
  197.  
  198.     frame number   A number used to refer to a given deck frame. You can
  199.                    obtain the current frame number by calling
  200.                    CyDeck::GetFrameNumber.
  201.  
  202.  
  203. 1.2 AVAILABILITY
  204. ================
  205.  
  206. The CDK is available from authorized CDK dealers. To locate a dealer near
  207. you, call 800-964-6432 from the U.S. or Canada, or fax your request to
  208. 415-491-8303 (from Latin America) or 415-491-8398 (from Asia and the
  209. Pacific).
  210.  
  211. The Suggested Retail Price of the CDK in the U.S. is $2,495.00 per copy.
  212. This includes the right to make and sell end-user application programs
  213. incorporating the CDK (or parts of it) in executable object-code form,
  214. with no further payments or royalties.
  215.  
  216. For more details about currently supported software and hardware, contact
  217. your CDK dealer. You might also want to contact the manufacturer of a
  218. device you are interested in, as drivers for additional devices are under
  219. development.
  220.  
  221.  
  222. 1.3 REQUIREMENTS
  223. ================
  224.  
  225. You need the following technical expertise, hardware, and software to
  226. use the CDK.
  227.  
  228.  
  229. 1.3.1 Technical Expertise
  230.  
  231. In order to use the CDK, you need to know how to program in C++ and be
  232. familiar with object-oriented programming concepts. The CDK DEVELOPER'S
  233. MANUAL is designed to get you started without a great deal of knowledge,
  234. but it does not teach the language or object-oriented programming.
  235.  
  236. In addition, creating cyberspace applications requires some knowledge of
  237. computer graphics. If you need help in this area, you may want to read a
  238. graphics textbook such as J.D. Foley and A. Van Dam, COMPUTER GRAPHICS
  239. PRINCIPLES AND PRACTICE (Reading, Massachusetts: Addison-Wesley, 1990).
  240.  
  241. Familiarity with AutoCAD or 3D Studio, and with the fundamentals of
  242. linear algebra is helpful -- although not strictly necessary.
  243.  
  244. Due to their interactive nature, cyberspace programs generally use
  245. specialized input and output equipment. Familiarity with this equipment 
  246. will help you produce useful programs.
  247.  
  248.  
  249. 1.3.2 Hardware
  250.  
  251. You need at least the following hardware to develop CDK applications:
  252.  
  253.     o A PC-compatible 386 or 486 computer
  254.  
  255.     o 8 megabytes of main memory
  256.  
  257.       (4 megabytes is possible, though you may not be able to run a
  258.       debugger on CDK programs)
  259.  
  260.     o An 80 megabyte disk drive
  261.  
  262.     o A 1.44 megabyte, 3 1/2 -inch floppy disk drive
  263.  
  264. If you need real-time interaction with geometry, you probably need some
  265. type of hardware graphics accelerator.
  266.  
  267. The CDK supports a variety of input and output devices, including head
  268. mount displays, sound displays, and six-dimensional sensors. Many of
  269. these are listed in the descriptions of the classes for "Displays,"
  270. "Audio," and "Sensors," below. The simplest supported set of I/O devices
  271. is this typical PC configuration:
  272.  
  273.     o A VGA video monitor that is VESA 1.2 compliant
  274.  
  275.     o A standard keyboard and keypad
  276.  
  277.     o A Microsoft mouse or equivalent
  278.  
  279.  
  280. 1.3.3 Software
  281.  
  282. You need the following software to develop CDK applications:
  283.  
  284.     o Zortech 386 C++ or Metaware High C/C++.
  285.  
  286.     o The Phar Lap 386|DOS Extender Software Development Kit.  This
  287.       includes the 386|DOS Extender, the 386|LINK program, and RUN386.
  288.  
  289.     o The Phar Lap program BIND|386, which you need only if you want to
  290.       produce real-mode (.exe) executables.
  291.  
  292.       NOTE: BIND|386 is sold separately from the DOS Extender SDK.
  293.  
  294. AutoCAD and 3D Studio aren't required, but can be very useful for
  295. creating geometrical models to display in cyberspace.
  296.  
  297.  
  298. 1.3.4 Network Hardware and Software
  299.  
  300. You don't need network hardware and software unless you wish to run
  301. distributed simulations. The CDK's distributed simulation software
  302. assumes you have an Ethernet-compatible network card and an appropriate
  303. TCP/IP protocol stack kernel for the card.
  304.  
  305.  
  306. 2. CDK CLASS ARCHITECTURE
  307. =========================
  308.  
  309. The CDK is a set of C++ classes and related routines. Writing a
  310. cyberspace applicationinvolves creating objects from these classes to
  311. build the virtual environment -- the deck, the space, geometry within
  312. the space with associated behavior (physical or otherwise), and I/O
  313. objects that enable the user to observe the space and affect it.
  314.  
  315. About 40 percent of the CDK classes inherit from the class CyBase, which
  316. defines event-handling methods. The most important subclass of CyBase is
  317. CySimBase, and most of the classes that inherit from CyBase are
  318. descendants of CySimBase. Class CySimBase defines the Simulate method.
  319. When you tell your deck to run, it calls the Simulate method of the
  320. space once each simulation cycle. The space, in turn, calls the Simulate
  321. methods of all objects in the space.
  322.  
  323. Classes that don't inherit from CyBase and CySimBase are primarily those
  324. that display information to the user, provide mathematical entities, and
  325. perform utility functions. These include the important display and
  326. geometry classes.
  327.  
  328. The classes in the CDK can be grouped into twelve primary categories:
  329.  
  330.     o Geometry
  331.  
  332.     o Geometry import and export
  333.  
  334.     o Displays
  335.  
  336.     o Audio
  337.  
  338.     o Sensors
  339.  
  340.     o Scheduling
  341.  
  342.     o Events
  343.  
  344.     o Physics
  345.  
  346.     o Viewers
  347.  
  348.     o Distributed simulation
  349.  
  350.     o Linear Algebra
  351.  
  352.     o Utility
  353.  
  354. The following sections discuss each group in turn.
  355.  
  356. NOTE: After each section head is a list of the classes in that category,
  357. arranged to show inheritance. The base classes (classes that do not have
  358. parents) are on the left, and the inheritance hierarchy proceeds toward
  359. the right.
  360.  
  361.  
  362. 2.1 Geometry
  363. ============
  364.  
  365.  
  366.     CyComponent
  367.       |
  368.       +--CyAssembly
  369.       |
  370.       +--CyLeaf
  371.            |
  372.            +--CyRBESet
  373.            |    |
  374.            |    +--CyRigidBody
  375.            |    |    |
  376.            |    |    +-------------CySection
  377.            |    |
  378.            |    +--CyNonRigidBody
  379.            |
  380.            +--CySolid
  381.                 |
  382.                 +--CySolBox
  383.                 |
  384.                 +--CySolPyr
  385.                 |
  386.                 +--CySolCon
  387.                 |
  388.                 +--CySolNos
  389.                 |
  390.                 +--CySolDom
  391.                 |
  392.                 +--CySolBal
  393.                 |
  394.                 +--CySolSph
  395.                 |
  396.                 +--CySolTor
  397.                 |
  398.                 +--CySolRed
  399.                 |
  400.                 +--CySolExt
  401.                 |
  402.                 +--CySolRev
  403.                 |
  404.                 +--CySolBool
  405.  
  406.     CyRBE
  407.       |
  408.       +--CyPolygon3
  409.       |
  410.       +--CyPolymesh
  411.       |
  412.       +--CyRectmesh
  413.  
  414.     CyCompInst
  415.       |
  416.       +--CySolInst
  417.  
  418.     CyPolicy
  419.       |
  420.       +--CyAnimPolicy
  421.       |
  422.       +--CyDistPolicy
  423.  
  424.     CyPicker
  425.  
  426.     CyPickRec
  427.  
  428.  
  429. The CDK has four kinds of geometrical objects: rigid bodies, non-rigid
  430. bodies, solid bodies, and assemblies.
  431.  
  432.     o You can model many objects in terms of the geometric primitives
  433.       polygons (CyPolygon3), polymeshes (CyPolymesh), and rectangular
  434.       meshes (CyRectmesh), which are rigid body elements and thus
  435.       subclasses of CyRBE. You group these primitives into rigid bodies
  436.       sets (CyRBESet), of which there are two types of rigid bodies
  437.       (CyRigidBody) and non-rigid bodies (CyNonRigidBody).
  438.  
  439.     o You can create other objects as solid bodies (CySolid). Solid
  440.       bodies include objects such as spheres, balls, boxes, and cones,
  441.       and also include more complex objects created as Boolean
  442.       combinations of solid bodies.
  443.  
  444.       A CySection is a rigid body made from a section of a solid.
  445.  
  446.     o You can combine geometrical objects into assemblies (CyAssembly).
  447.       An assembly might, for example, represent an articulated machine
  448.       where parts can move with some independence. An assembly is also
  449.       used as the top-level container for all the geometry in a space.
  450.  
  451. Rigid bodies, non-rigid bodies, solid bodies, and assemblies are types
  452. of "components" (CyComponent). A component is a template for a
  453. geometrical object. When you make a particular instance of the object,
  454. you create a "component instance" (CyCompInst or CySolInst, which is
  455. specialized for solids). A component instance has a reference to the
  456. component (or several components) along with surface properties (such as
  457. color) and a rigid motion.
  458.  
  459. A policy (CyPolicy) object determines which specific representation of
  460. an object is appropriate to display at a particular time. CyPolicy is a
  461. base class that you never instantiate. The CDK includes two subclasses
  462. of CyPolicy that implement two kinds of policies: CyDistPolicy decides
  463. which representation to use based on the distance between the viewer and
  464. the object; CyAnimPolicy implements animation by cycling through a
  465. sequence of representations of an animated object.
  466.  
  467. A picker (CyPicker) is an object that is used to select or pick
  468. component instances. A picker object returns a CyPickRec object.
  469.  
  470. CyLeaf is an abstract class that exists for organizational purposes in
  471. the class hierarchy.
  472.  
  473.  
  474. 2.2 Geometry Import and Export
  475. ==============================
  476.  
  477.  
  478.     CyGfile
  479.       |
  480.       +--CyGfileADS
  481.       |
  482.       +--CyGfileDXF
  483.       |
  484.       +--CyGfile3DS
  485.  
  486.  
  487. You can create a geometric structure from within a program (most easily
  488. by using the solid modeling package), but you may find it easier to
  489. import geometry that you created somewhere else.
  490.  
  491. In addition, once you create or modify geometry in a CDK program, you
  492. may want to export it for use in programs such as AutoCAD. This
  493. capability is provided CyGfileDXF and CyGfileADS.
  494.  
  495. The utility class CyGfile is a base class for classes that translate
  496. geometry from external formats into CDK-style components and translate
  497. components into external geometry.
  498.  
  499. CyGfile has three predefined subclasses:
  500.  
  501.     o CyGfileDXF translates graphical elements in DXF (Drawing
  502.       Interchange Format). This class can also translate graphical
  503.       elements from a CDK program into DXF.
  504.  
  505.     o CyGfileADS translates graphics over an AutoCAD Development System
  506.       link from a running AutoCAD session.
  507.  
  508.     o CyGfile3DS translates graphical elements from a 3D Studio file.
  509.       Animation information is not translated.
  510.  
  511. For importing AutoCAD files, geometry can be defined in terms of 3D
  512. Face, polyface mesh, or rectangular polygon mesh entities, which can be
  513. arbitrarily nested in block references. The CDK does not support scaling
  514. and mirroring of block references, however.
  515.  
  516.  
  517. 2.3 Displays
  518. ============
  519.  
  520.  
  521.     CyDisplay3d
  522.       |
  523.       +--CyDViewdisp
  524.       |
  525.       +--CySPEAdisp
  526.       |
  527.       +--CyVESAdisp
  528.       |
  529.       +--CyADIdisp 
  530.  
  531.     CyBase
  532.       |
  533.       +--CySimBase
  534.            |
  535.            +--CyLight
  536.  
  537.     CySurfaceTable
  538.  
  539.     CyTexture
  540.  
  541.  
  542. Once you define your geometry, you need to load it into a particular
  543. display device so that the user can eventually see the geometry.
  544. CyDisplay3d implements the capabilities of an ideal display device; the
  545. subclasses of CyDisplay3d specialize these capabilities for particular
  546. hardware:
  547.  
  548.     o CyDViewdisp is for the dView board set from Division, Ltd.
  549.  
  550.     o CySPEAdisp is for the VideoSeven SPEA Fire board.
  551.  
  552.     o CyVESAdisp is for cards that use the VESA-1.2 standard.
  553.  
  554.     o CyADIdisp is for the Autodesk Device Interface 4.2 Rendering
  555.       Specification.
  556.  
  557. The CyDisplay3d class defines an abstraction that lets your program
  558. ignore what kind of display device is used at run time. The abstraction
  559. assumes that the device (either through hardware or software) can group
  560. graphics primitives into segments. Each segment is given an identifier
  561. of type CySegId (currently an integer).
  562.  
  563. Generally, when you add your geometrical models to the space, the space
  564. places geometric elements in one or more segments on the display device.
  565. (You can manually control which segment the CDK uses for a particular
  566. geometric element. In general, though, the space handles this for you.)
  567. The space then posts the segments to be drawn. To actually draw the
  568. image, the deck calls the display's Regen method. Regen traverses the
  569. list of posted segments, telling the corresponding CyComponent instance
  570. to redraw.
  571.  
  572. Some displays can render geometry in either shaded or wire frame mode.
  573. You can control the mode by calling the SetWireframe method.
  574.  
  575. Polygons can optionally undergo Gouraud shading. CyDisplay3d provides
  576. Gouraud shading if you define normals for each vertex of the polygon.
  577. The constructors for the polygon, polymesh, and rectangular mesh
  578. primitives have the array of normals as an optional argument. If you
  579. supply the array of normals, CyDisplay3d displays smoothly shaded
  580. polygons. If you don't supply the array, the polygons appear flat.
  581.  
  582. Although the view presented to the user is often controlled by a
  583. separate viewer object, you can set the view directly through the
  584. display. You can specify a view in one of two ways:
  585.  
  586.     o You can supply "from" and "to" vertices and an "up" vector.
  587.  
  588.     o You can supply a view matrix that gives a coordinate system for
  589.       the view. The origin of the coordinate system is the viewer's eye
  590.       position, the negative Z axis points along the view direction,
  591.       and the Y axis points "up" with regard to the resulting image.
  592.  
  593. You can use either an orthographic or a perspective projection. Define
  594. an orthographic projection by describing a rectangular parallelepiped
  595. in view space -- that is, with minimum and maximum coordinates in X, Y,
  596. and Z. Define a perspective projection by specifying a view angle and
  597. near and far clipping plane distances.
  598.  
  599. A display has a surface table (CySurfaceTable). Each element of the
  600. table describes surface properties that can be used for your geometry.
  601. The elements of the table are of type CySurface, which is a structure,
  602. not a class. The table can contain items of type CyTexture, which define
  603. surface textures.
  604.  
  605. CyLight is an abstraction for generating and manipulating light sources
  606. within a space.
  607.  
  608.  
  609. 2.4 Audio
  610. =========
  611.  
  612.  
  613.     CyBase
  614.       |
  615.       +--CyAudioDisplay3d
  616.       |    |
  617.       |    +--CyConvolvoTron
  618.       |
  619.       +--CySimBase
  620.            |
  621.            +--CySequencer
  622.  
  623.  
  624. You can use the audio classes to produce sound effects in a space
  625. through a MIDI interface. In addition, the Convolvotron is a device that
  626. can position a sound source in three dimensions.
  627.  
  628.  
  629. 2.5 Sensors
  630. ===========
  631.  
  632.  
  633.     CyBase
  634.       |
  635.       +--CySensor
  636.            |
  637.            +--CyScalar
  638.            |    |
  639.            |    +--CyComputrainer
  640.            |
  641.            +--CySensor2d
  642.            |    |
  643.            |    +--CyADISensor2d 
  644.            |    |
  645.            |    +--CyMouse
  646.            |
  647.            +--CySensor6d
  648.            |    |
  649.            |    +--CyBoom6d
  650.            |    |
  651.            |    +--CyGeoBall
  652.            |    |
  653.            |    +--CyKeypad6d
  654.            |    |
  655.            |    +--CyADISensor6d 
  656.            |    |
  657.            |    +--CyFastrak
  658.            |    |
  659.            |    +--CyLTracker
  660.            |    |
  661.            |    +--CyPolhemus
  662.            |    |
  663.            |    +--CySensor6d_2d
  664.            |    |
  665.            |    +--CyVplGlove
  666.            |
  667.            +--CyVTGlove
  668.  
  669.  
  670. You can use various devices to get user input, and use the input to
  671. direct actions within the space.
  672.  
  673. There are four basic kinds of sensors:
  674.  
  675.     o Scalar (CyScalar) sensors detect one-dimensional information. A
  676.       scalar device is used typically to get a measurement between some
  677.       minimum and maximum value.
  678.  
  679.     o Two-dimensional (CySensor2d) sensors detect positions on a plane.
  680.       Examples of two-dimensional sensors are mouse devices, digitizers,
  681.       joysticks, and trackballs. They return ordered pairs of real numbers.
  682.  
  683.     o Six-dimensional, or six-degree-of-freedom (CySensor6d) sensors
  684.       detect six dimensions of information: X, Y, and Z positions plus
  685.       roll, pitch, and yaw.
  686.  
  687.     o Gloves return "flex map" data describing the flex angle of certain
  688.       hand joints. Some gloves also return 6D position data; others do
  689.       not.
  690.  
  691. The rest of the sensor classes are specialized for particular sensors:
  692.  
  693.     o CyComputrainer is a scalar sensor that is tuned specifically for
  694.       the Racer-Mate Computrainer computer-aided trainer. You can define
  695.       and use it as a scalar object where it simply returns speed values
  696.       or as a Computrainer with full access to the device, enabling you
  697.       to obtain, for example, grade, head wind, inertia settings,
  698.       calorie consumption, maximum speed, and average speed.
  699.  
  700.     o CyADISensor2d gets two-dimensional information from the Autodesk
  701.       Device Interface protocol.
  702.  
  703.     o CyMouse gets two-dimensional information from a Microsoft mouse.
  704.  
  705.     o CyBoom6d gets six-dimensional information from the Fake Space Labs
  706.       BOOM display.
  707.  
  708.     o CyKeypad6d uses keypad information to simulate six-dimensional
  709.       sensor information.
  710.  
  711.     o CyADISensor6d gets six-dimensional information from the Autodesk
  712.       Device Interface protocol.
  713.  
  714.     o CyLTracker gets six-dimensional information from the Logitech
  715.       2D/6D mouse device.
  716.  
  717.     o CyPolhemus gets six-dimensional information from the Polhemus
  718.       3SPACE ISOTRAK system.
  719.  
  720.     o CyFastrak gets six-dimensional information from the Polhemus
  721.       3SPACE FASTRAK six-dimensional sensor.
  722.  
  723.     o CySensor6d_2d maps a two-dimensional sensor, such as a mouse, into
  724.       any two dimensions out of the six dimensions a six-dimensional
  725.       sensor uses.
  726.  
  727.     o CyGeoBall gets six-dimensional information from the CIS Graphics
  728.       Di6 GEOMETRY BALL.
  729.  
  730.     o CyVplGlove represents the VPL Research DataGlove glove device. It
  731.       gets six-dimensional information as well as glove position
  732.       information.
  733.  
  734.     o CyVTGlove returns glove position information for the Virtual
  735.       Technologies CyberGlove glove device.
  736.  
  737. The SetRange method governs the range of coordinates that devices
  738. generate. The exact interpretation of the range depends on the device,
  739. but, in general, the device class maps the range to the range of motion
  740. natural to the device. In the case of a digitizer, for example, the
  741. range rectangle is mapped directly to the measurable surface of the pad.
  742. For a joystick, the range corresponds to the physical limits of the
  743. stick's movement. A mouse or trackball, on the other hand, has no
  744. inherent limits. In this case, the range, by default, corresponds to the
  745. distance covered by a typical use of the device (for example, a movement
  746. of about six inches for a mouse). Specific methods are available in
  747. these classes for finer control of the mapping between physical movement
  748. and returned values.
  749.  
  750. Each interaction with a two-dimensional device can be thought of as
  751. moving a particle on a plane. The coordinates of the particle at a given
  752. time are returned by the GetXY method. The relative coordinates from a
  753. programmer-defined reference point are returned through the GetDeltaXY
  754. method.
  755.  
  756. The precise manner in which this particle moves around the plane varies
  757. from device to device. There are, however, two main categories of two-
  758. dimensional sensors: those with a natural resting position, such as a
  759. spring-based joystick, and those without a natural position. Devices
  760. that have a natural resting position can operate in one of two modes:
  761. "accumulate on" or "accumulate off." With "accumulate off," the particle
  762. moves in direct analog to the position of the device; for example, if
  763. the joystick is at its center position, the particle will be at the
  764. center of the range rectangle. If the user pulls the joystick fully to
  765. the left, the particle moves to the left edge of the range rectangle.
  766. With "accumulate on," the particle moves along the vector defined by the
  767. position of the device.
  768.  
  769. Six-dimensional devices operate like the two-dimensional model outlined
  770. above. However, instead of a particle moving along a plane, a six-
  771. dimensional sensor has a three-dimensional coordinate system that it
  772. moves and orients in space. The GetXY method used for two-dimensional
  773. sensors generalizes to GetMat, which returns the matrix representing the
  774. position and orientation of the particle. The GetDeltaXY method used for
  775. two-dimensional sensors becomes GetDeltaMat, which returns the
  776. transformation needed to move from a user-defined reference coordinate
  777. system to the current position of the particle. 
  778.  
  779. CySensor6d has methods that allows you to obtain raw data from six-
  780. dimensional sensors. The GetData and GetDeltaData methods return a
  781. record that contains the X, Y, and Z translation values as well as the
  782. azimuth, elevation, and roll Euler angles that specify the orientation.
  783.  
  784. Six-dimensional devices can also be grouped into two categories based on
  785. the presence of a natural resting position. Devices such as Geoball
  786. sensors will naturally return an identity matrix in the absence of user
  787. interaction. Devices such as Polhemus trackers do not have any such
  788. preferred position. Devices that have a resting position have an 
  789. "accumulate on" mode to allow them to easily move and orient in a six-
  790. dimensional coordinate system.
  791.  
  792.  
  793. 2.6 Scheduling
  794. ==============
  795.  
  796.  
  797.     CyBase
  798.       |
  799.       +--CyDeck
  800.       |
  801.       +--CySimBase
  802.            |
  803.            +--CySpace
  804.            |    |
  805.            |    +--CyNewtonianSpace
  806.            |
  807.            +--CyDynamics
  808.                 |
  809.                 +--CyNewtonianDynamics
  810.  
  811.  
  812. The scheduling classes implement the most important part of the
  813. Canonical Scheduling Tree (CST).
  814.  
  815. The CST is a structure for writing a program in which the CDK handles
  816. scheduling for you. In a CST program, the user uses the deck (CyDeck) to
  817. observe and interact with the space (CySpace). The deck fields incoming
  818. events and does the following each time through the simulation cycle:
  819.  
  820.     o Polls all sensors
  821.  
  822.     o Invokes the Simulate method of the space, which, in turn, invokes
  823.       the Simulate methods of the objects in the space
  824.  
  825.     o Tells the displays to regenerate the graphics, audio, and other
  826.       feedback
  827.  
  828.     o Dispatches events to objects that should receive them
  829.  
  830. The CST is a simple, hierarchical arrangement of C++ class instances in
  831. a tree-data structure. Each node of the tree is a C++ object.
  832.  
  833. The following three classes shape the CST.
  834.  
  835.     o CyDeck. The center of each program is an object of type CyDeck
  836.       (called a deck). A deck represents the hardware platform: the
  837.       computer with effectors (such as display devices) and sensors. The
  838.       deck has the main control loop. There is always one and only one
  839.       deck.
  840.  
  841.     o CySpace. The space that the user interacts with is represented by
  842.       an object of type CySpace (called a space). The space contains the
  843.       objects that inhabit the virtual world. It also has objects that
  844.       map between external phenomena (such as information received from
  845.       sensors) and the objects in the space. There is only one current
  846.       space, but a program can have several spaces and switch between
  847.       them.
  848.  
  849.     o CyDynamics. Physical forces such as gravity and relationships
  850.       between objects in the space are represented by CyDynamics
  851.       objects.
  852.  
  853. Here is a conceptual picture of the CST:
  854.  
  855.  
  856.     Deck
  857.       |
  858.       +---Sensor(s)
  859.       |
  860.       +---Space
  861.       |      |
  862.       |      +---Object(s)
  863.       |      |
  864.       |      +---Dynamics
  865.       |      |         |
  866.       |      |         +---Physic(s)
  867.       |      |         |
  868.       |      |         +---Resolver
  869.       |      |         |
  870.       |      |         +---Collision Server
  871.       |      |
  872.       |      +---Viewer
  873.       |
  874.       +---Display
  875.  
  876.  
  877. 2.7 Events
  878. ==========
  879.  
  880.  
  881.     CyBase
  882.  
  883.     CyNotifier
  884.  
  885.     CyEvent
  886.  
  887.  
  888. CyBase is the base class for all classes that can send and receive
  889. events. This facility is provided primarily so that you can send and
  890. receive events when you create subclasses of descendants of CyBase such
  891. as CySimObj or CyPhysical. CyBase defines the following event-related
  892. methods:
  893.  
  894.     o TellMeAbout is called by an object that wants to receive a
  895.       particular type of event. It is usually called from an class
  896.       constructor or Establish method. When you call TellMeAbout, you
  897.       pass in an event template that matches the kind of events you want
  898.       to receive.
  899.  
  900.     o Ignore is called by an object that wants to stop receiving events.
  901.  
  902.     o Squawk is called by an object to post an event. 
  903.  
  904.     o An object's ProcessEvent method is called by the notifier 
  905.       (described below) when the notifier has an event for the object.
  906.  
  907. The notifier, an object of type CyNotifier, distributes events to
  908. objects that declared they wanted events of that kind. Only one notifier
  909. object exists at a time -- the CDK creates it automatically at start-up.
  910. You can access the notifier through the global variable TheNotifier.
  911.  
  912. Events are objects of type CyEvent. Every event has a class, represented
  913. by an integer from zero to 255, which is a general grouping such as
  914. MOUSEBUTTON or KEYBOARD, and a type, represented by an integer between
  915. zero and 63, which is a more specific grouping such as LEFT_DOWN or
  916. KEYUP. Events can also have data; keyboard events, for example, have
  917. data that indicate which keys are involved in the event. Integers below
  918. 128 for classes are reserved for CDK use. Event types are defined per
  919. class, so you can use any valid integer for a new type without conflict
  920. with the CDK.
  921.  
  922.  
  923. 2.8 Physics
  924. ===========
  925.  
  926.  
  927.     CyBase
  928.       |
  929.       +--CySimBase
  930.            |
  931.            +--CySimObj
  932.            |    |
  933.            |    +--CyPhysical
  934.            |
  935.            +--CyPhysics
  936.            |    |
  937.            |    +--CyGravity
  938.            |    |
  939.            |    +--CyPGravity
  940.            |    |
  941.            |    +--CySpring
  942.            |    |
  943.            |    +--CyFriction
  944.            |    |
  945.            |    +--CyResolve
  946.            |    |
  947.            |    +--CyCollisionServer
  948.            |         |
  949.            |         +--CyCollisionSphere
  950.            |              |
  951.            |              +--CyCollisionBox
  952.            |
  953.            +--CyMetric
  954.  
  955.     CyCollisionEvent
  956.       |
  957.       +--CyCollisionSphereSphere
  958.       |
  959.       +--CyCollisionBoxSphere
  960.       |
  961.       +--CyCollisionBoxBox
  962.  
  963.     CyCBox
  964.  
  965.     CyMassProperty 
  966.       |
  967.       +--CyAMEMassProp
  968.       |
  969.       +--CySolMassProp
  970.  
  971.  
  972. The physics classes provide a means for simulating how objects are
  973. affected by external stimuli.
  974.  
  975. A physical object (CyPhysical) provides a bridge between a geometrical
  976. representation and physical effects.
  977.  
  978. CyPhysics is the base class for particular physical effects. These
  979. effects are implemented by the classes CyGravity, CyPGravity, CySpring,
  980. and CyFriction. CyResolve resolves forces applied by the physics classes
  981. into velocities and positions for CyPhysical objects.
  982.  
  983. A CyCollisionServer class handles collisions between physical objects.
  984. CyCollisionSphere handles sphere-to-sphere collisions. CyCollisionBox
  985. handles box-to-box, sphere-to-box, and sphere-to-sphere collisions. A
  986. CyCollisionServer creates objects of type CyCollisionEvent to watch for
  987. collisions between pairs of objects. CyCollisionSphereSphere handles
  988. pairs of spheres; CyCollisionBoxBox handles pairs of boxes;
  989. CyCollisionBoxSphere handles pairs made up of a box and a sphere. CyCBox
  990. specifies an object's bounding box for collision detection.
  991.  
  992. CyMassProperty is a base class for specifying a solid's mass properties.
  993. There are two sub-classes:
  994.  
  995.     o CyAMEMassProp is for specifying the mass properties of AME
  996.       objects.
  997.  
  998.     o CySolMassProp is for specifying the mass properties of CySolid
  999.       objects.
  1000.  
  1001.  
  1002. 2.9 Viewers
  1003. ===========
  1004.  
  1005.     CyBase
  1006.       |
  1007.       +--CySimBase
  1008.       |    |
  1009.       |    +--CySimObj
  1010.       |         |
  1011.       |         +--CyViewer
  1012.       |              |
  1013.       |              +--CyDollyView
  1014.       |              |
  1015.       |              +--CyTargetView
  1016.       |              |
  1017.       |              +--CyParasiteView
  1018.       |              |
  1019.       |              +--CyPlatformView
  1020.       |              |
  1021.       |              +--CyTrackView 
  1022.       |
  1023.       +--CyMouseView
  1024.  
  1025.  
  1026. A viewer (CyViewer) represents the user's point of view in the space;
  1027. or, if you prefer, a window into the space. Viewers generally move in
  1028. response to information gathered from sensors. Each simulation cycle,
  1029. the space draws the objects in the space as seen from the point of view
  1030. of the viewer and shows the results on the display.
  1031.  
  1032. A viewer is a special kind of simulated object, an object of type
  1033. CySimObj, that sets the viewpoint of a given display. The different
  1034. subclasses of CyViewer implement different strategies for moving the
  1035. viewer. The Simulate method of each subclass implements that subclass's
  1036. strategy.
  1037.  
  1038. The view classes implement the following viewing metaphors:
  1039.  
  1040.     o CyDollyView defines a viewer analogous to a camera mounted on a
  1041.       dolly. You can attach a sensor to the dolly and a sensor to the
  1042.       camera.
  1043.  
  1044.     o CyTargetView defines a viewer in which the camera platform moves
  1045.       toward a target destination either at a constant velocity or at a
  1046.       velocity proportional to the distance remaining to the target
  1047.       (converge mode). While moving, the orientation of the platform is
  1048.       fixed: it is subject only to translation. You can attach a
  1049.       CySensor6d sensor to the camera to move it relative to the
  1050.       platform.
  1051.  
  1052.     o CyPlatformView is a simple example of a viewer. This class moves
  1053.       the view forward or backward along the line of sight in response
  1054.       to events. The class monitors a six-dimensional sensor to
  1055.       determine the line of sight.
  1056.  
  1057.     o CyParasiteView defines a movable viewer that is attached to a
  1058.       CySimObj object. You can attach a CySensor6d sensor to the camera
  1059.       to move it relative to the object.
  1060.  
  1061.     o CyTrackView defines a viewer that is continually oriented to look
  1062.       toward another object in the space. You can attach a CySensor6d
  1063.       sensor to the camera to provide additional movement.
  1064.  
  1065. CyMouseView is a utility class for use with platform viewers. It
  1066. receives mouse button events and converts them to platform viewer
  1067. events.
  1068.  
  1069.  
  1070. 2.10 Distributed Simulation
  1071. ===========================
  1072.  
  1073.  
  1074.     CyNetPort
  1075.  
  1076.     CyConsCell
  1077.  
  1078.     CyMsg
  1079.  
  1080.     CyCommunicator
  1081.  
  1082.     CyBase
  1083.       |
  1084.       +--CySimBase
  1085.  
  1086.  
  1087. These classes provide the distributed (that is, networked) simulation
  1088. mechanism in the CDK.
  1089.  
  1090. CyNetPort provides low-level access to the network software. You
  1091. generally need to use this to create a network facility that suits your
  1092. application.
  1093.  
  1094. CyCommunicator is an example of a class that uses CyNetPort to create a
  1095. distributed application mechanism. A CyCommunicator object communicates
  1096. between simulation programs running on different computers on the same
  1097. network. The CyCommunicator object sends CyMsg objects, which contain
  1098. CyConsCell objects as well as information of other types. CyConsCell
  1099. implements a LISP-like (cons) cell.
  1100.  
  1101. CySimBase defines methods that are called by the communicator. Those
  1102. methods return or interpret CyMsg objects.
  1103.  
  1104.  
  1105. 2.11 Linear Algebra
  1106. ===================
  1107.  
  1108.  
  1109.     CyVertex3
  1110.  
  1111.     CyVector3
  1112.  
  1113.     CyMatrix
  1114.  
  1115.     CyGMatrix
  1116.  
  1117.     CyRay
  1118.  
  1119.     CyPlane
  1120.  
  1121.     CyQuaternion
  1122.  
  1123.     CyMatInterp
  1124.  
  1125.  
  1126. The CDK includes a set of classes for basic computations in three
  1127. dimensions:
  1128.  
  1129.     o CyVertex3 defines a point in three dimensions.
  1130.  
  1131.     o CyVector3 defines a direction and a magnitude.
  1132.  
  1133.     o CyMatrix defines a coordinate system optimized for rigid motion
  1134.       specifications.
  1135.  
  1136.     o CyGMatrix defines a generalized four-by-four matrix.
  1137.  
  1138.     o CyRay defines a semi-infinite line in three-dimensional space.
  1139.  
  1140.     o CyPlane defines a plane by a point and a normal vector.
  1141.  
  1142.     o CyQuaternion is an alternative representation for orientation.
  1143.       Quaternion structures are useful in smoothly interpolating between
  1144.       two orientations.
  1145.  
  1146.     o CyMatInterp interpolates between two rigid motion specifications.
  1147.  
  1148.  
  1149. 2.12 Utility
  1150. ============
  1151.  
  1152. The CDK utility classes address the following general areas.
  1153.  
  1154.  
  1155. 2.12.1 DSCVR 
  1156.  
  1157.  
  1158.     CyCDFMgr
  1159.  
  1160.     CyVal
  1161.       |
  1162.       +--CyValInt
  1163.       |
  1164.       +--CyValReal
  1165.       |
  1166.       +--CyValName
  1167.       |
  1168.       +--CyValComposite
  1169.       |    |
  1170.       |    +--CyValTuple
  1171.       |    |
  1172.       |    +--CyValTupleSpace
  1173.       |         |
  1174.       |         +--CyCDFDatabase
  1175.       |         |
  1176.       |         +--CyPointerDatabase
  1177.       |         |
  1178.       |         +--CyCDFMakerDatabase
  1179.       |
  1180.       +--CyValStruct
  1181.       |
  1182.       +--CyValBlock
  1183.  
  1184.     CyDSCVRReader
  1185.  
  1186.  
  1187. DSCVR (Distributed Shared Cyberspace Virtual Representation, a Linda
  1188. variant) serves as a central database facility for the CDK. DSCVR stores
  1189. information as tuples within the context of a particular "tuplespace."
  1190. You retrieve objects by matching patterns on key fields within the
  1191. tuple.
  1192.  
  1193. You can use DSCVR as a database mechanism, but DSCVR also serves an
  1194. important role in conjunction with CDK applications. You can use a
  1195. defined DSCVR structure known as the Cyberspace Description Format (CDF)
  1196. to specify a display, sensors, and the objects in a particular space by
  1197. declaring items in a file. Thus, you can populate parts or all of a
  1198. simulation scheduling tree from an external ASCII file.
  1199.  
  1200. A CyCDFMgr object controls reading and processing CDF files.
  1201.  
  1202. A CyDSCVRReader object reads a DSCVR Text Form (DTF) file or string and
  1203. produces a DSCVR structure.
  1204.  
  1205. A CyPointerDatabase is a two-level database of pointers. Pointers
  1206. (actually any 32-bit value) can be stored under symbolic names. For
  1207. example, a pointer to a CySpace might be stored in the section SPACES
  1208. with the name myspace:
  1209.  
  1210.     CyPointerDatabase pdb;
  1211.     CySpace *myspaceptr1 = new CySpace();
  1212.     pdb.AddItem("SPACES", "myspace", myspaceptr1);
  1213.     CySpace *myspaceptr2 = (CySpace *) pdb.GetItem("SPACES", "myspace");
  1214.  
  1215. A CyCDFMakerDatabase associates class names with C maker functions that
  1216. parse CDF into class creation and initialization directives.
  1217.  
  1218. CyVal is the base class for DSCVR.
  1219.  
  1220.  
  1221. 2.12.2 Lists 
  1222.  
  1223.  
  1224.     CyDqueue
  1225.       |
  1226.       +--CyAssocList
  1227.  
  1228.     CyCons
  1229.  
  1230.     CyAssoc
  1231.  
  1232.  
  1233. These define general list-management classes.
  1234.  
  1235. A CyDqueue is a doubly linked list. It has append and concatenation
  1236. constructors. A CyDqueue object holds CyCons objects.
  1237.  
  1238. A CyAssocList object is an association list construct. It associates two
  1239. 32-bit values and keys on the first value. A CyAssocList object holds
  1240. CyAssoc objects.
  1241.  
  1242.  
  1243. 2.12.3 Random Number Generator
  1244.  
  1245.  
  1246.     CyRandomizer 
  1247.  
  1248.  
  1249. CyRandomizer is a 32-bit pseudo-random number generator that uses an
  1250. enhanced implementation of S. Wolfram's "Rule 30" one-dimensional
  1251. cellular automaton.
  1252.  
  1253.  
  1254. 2.12.4 Serial
  1255.  
  1256.  
  1257.     CySerialPort 
  1258.  
  1259.  
  1260. CySerialPort provides access to a serial port under Phar Lap extended
  1261. DOS. It provides internal buffers for record assembly and complete
  1262. control of all serial communication parameters.
  1263.  
  1264.  
  1265. 2.12.5 Matcher
  1266.  
  1267.  
  1268.     CyMatcher
  1269.  
  1270.  
  1271. CyMatcher is a base class for determining the nearest match to a set of
  1272. templates used for gesture recognition.
  1273.  
  1274.  
  1275. 2.12.6 LoopTimer 
  1276.  
  1277.  
  1278.     CyBase
  1279.       |
  1280.       +--CySimBase
  1281.            |
  1282.            +--CyLoopTimer
  1283.  
  1284.  
  1285. CyLoopTimer reports at specified intervals on the time a particular
  1286. simulation cycle uses. This class is intended primarily as a development
  1287. tool.
  1288.  
  1289.  
  1290. 2.12.7 ClockSync
  1291.  
  1292.  
  1293.     CyBase
  1294.       |
  1295.       +--CySimBase
  1296.            |
  1297.            +--CyClockSync
  1298.  
  1299.  
  1300. CyClockSync is designed to monitor the time increment (dt) and adjust it
  1301. as necessary to simulate intervals of real time. It allows you to
  1302. simulate different intervals of real time, allowing, for example, one
  1303. second of real time to be equal to one second or one minute of simulated
  1304. time. (If you don't use CyClockSync, the relationship between real time
  1305. and simulated time is arbitrary.)
  1306.  
  1307. To use CyClockSync, construct a CyClockSync object, passing it the
  1308. amount of simulated time that should pass for each unit of real time.
  1309. You should then add the CyClockSync object to the space as a CySimBase
  1310. in the SP_LAST simulation bin. For example, if space is a CySpace object
  1311. and clocksync is a CyClockSync object, you would use the following code 
  1312. to add the clocksync object to the space:
  1313.  
  1314.     space->AddSimBase( clocksync, SP_LAST );
  1315.  
  1316. CyClockSync monitors the real time that has passed since the program
  1317. last called CyClockSync::Simulate and adjusts the simulation loop time
  1318. increment (dt) of the resolver to maintain the time scale parameter that
  1319. you set.
  1320.  
  1321.  
  1322. 2.12.8 Interpolator
  1323.  
  1324.  
  1325.     CyInterpolator
  1326.  
  1327.  
  1328. CyInterpolator interpolates between two real numbers over a specified
  1329. number of frames or a specified amount of time.
  1330.  
  1331.  
  1332. 2.12.8 Cursor
  1333.  
  1334.  
  1335.     CyCursor
  1336.  
  1337.  
  1338. CyCursor displays a fixed target along the line of sight at each
  1339. simulation frame.
  1340.  
  1341. ________________________________________________________________________
  1342.  
  1343.  
  1344. The following are registered trademarks of Autodesk, Inc.: ADI, Advanced
  1345. Modeling Extension, AME, Autodesk, the Autodesk logo, AutoCAD, and
  1346. 3D Studio.
  1347.  
  1348. The following are trademarks of Autodesk, Inc.: AutoCAD Development
  1349. System, Autodesk Device Interface, DXF, and HyperChem.
  1350.  
  1351. All other brand and product names are trademarks or registered
  1352. trademarks of their respective holders.
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.